﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/User.Master" AutoEventWireup="true"
    CodeBehind="CS_YS_Query.aspx.cs" Inherits="CoolERP_Web.User.CS_YS_Query" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../Scripts/lhgdialog/lhgcore.min.js" type="text/javascript"></script>
<script src="../Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
<script type="text/javascript">
    var dg;
    function showEdit(obj) {
        var checkbox = $(obj).closest("tr").find("input[type=checkbox]");
        var bh = $(checkbox).val().split(",")[0];
        var lxbh = $(checkbox).val().split(",")[1];
        dg = new J.dialog({ id: 'select', title: '修改颜色', page: 'CS_YS_Edit.aspx?lxbh=' + lxbh + '&bh=' + bh, iconTitle: false, cover: true, btnBar: false, rang: true, autoSize: true, width: 450 });
        dg.ShowDialog();
    }
    function showAdd() {
        dg = new J.dialog({ id: 'select', title: '新增颜色', page: 'CS_YS_Edit.aspx', iconTitle: false, cover: true, btnBar: false, rang: true, autoSize: true, width: 450 });
        dg.ShowDialog();
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td class="tbHead_L"></td>
            <td class="tbHead_M"><div><b>颜色列表</b></div></td>
            <td class="tbHead_R"></td>
        </tr>
        <tr>
            <td class="tbBody_L"></td>
            <td class="tbBody_M">
                <div style="width:60%">
                    <ul class=tags>
                        <li class=liLeft><img id="imgAdd" runat=server src="../Images/Common/btn_add0.png" onclick="javascript:showAdd()" style="cursor:pointer" /></li>
                    </ul>
                    <asp:GridView ID="GridView1" runat="server" DataKeyNames="BH,YSLXBH" Width="100%" PageSize="20"
                        ClientIDMode="Static" CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True">
                        <Columns>
                            <asp:TemplateField ShowHeader="False">
                                <HeaderTemplate><label><input type="checkbox" onclick="checkAll('GridView1',this)" />全选</label></HeaderTemplate>
                                <ItemTemplate><input runat=server type=checkbox id="chkSel" name="chkSel" value='<%# Eval("BH").ToString() + "," + Eval("YSLXBH").ToString() %>' /></ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="编号" DataField="BH" ReadOnly="true" />
                            <asp:BoundField HeaderText="名称" DataField="MC" />
                            <asp:BoundField DataField="YSLXBH" HeaderText="类型编号" ReadOnly="True" />
                            <asp:BoundField DataField="YSLXMC" HeaderText="类型名称" ReadOnly="True" />
                            <asp:TemplateField ShowHeader="False">
                                <HeaderTemplate>编辑</HeaderTemplate>
                                <ItemTemplate><img src="../Images/Common/btn_edit0.png" onclick="javascript:showEdit(this);" style="cursor:pointer" /></ItemTemplate>
                            </asp:TemplateField>  
                        </Columns>
                        <PagerSettings Visible="false" />
                    </asp:GridView>
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CssClass="pager"
                        UrlPaging="false" ShowCustomInfoSection="Left" FirstPageText="首页" LastPageText="尾页"
                        PrevPageText="前页" NextPageText="后页" OnPageChanged="AspNetPager1_PageChanged"
                        TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" PageIndexBoxType="TextBox"
                        ShowPageIndexBox="Auto" SubmitButtonText="Go" CustomInfoHTML="共%RecordCount%条数据，每页%PageSize%条，共%PageCount%页，当前为第%CurrentPageIndex%页">
                    </webdiyer:AspNetPager>
                    <asp:Panel ID="panMsg" runat="server" ClientIDMode=Static CssClass="msg24_attention" Visible=false>无相关数据</asp:Panel>
                </div>
            </td>
            <td class="tbBody_R"></td>
        </tr>
        <tr>
            <td class="tbFoot_L"></td>
            <td class="tbFoot_M"></td>
            <td class="tbFoot_R"></td>
        </tr>
    </table>
</asp:Content>
